package com.luo.employee_oa.mapper;

import com.luo.employee_oa.pojo.Employees;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface EmployeesMapper {

    @Select("SELECT * FROM employees")
    List<Employees> inquireAboutAllEmployees();

    Employees inquireAboutEmployeeById(Integer employeeId);

    @Select("SELECT * FROM employees WHERE name LIKE CONCAT('%', #{name}, '%')")
    Employees inquireAboutEmployeeByName(String name);

    Employees inquireAboutEmployeeByEmployeeNo(String employeeNo);

    int addEmployee(Employees employees);
}
